<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Noty',
        'language'=>'pl',
        'sourceLanguage'=>'en',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
                'application.extensions.*',

                //urbac
                'application.modules.urbac.models.*',
                'application.modules.urbac.components.*',

	),

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=vlt_noty',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => 'moteris2222',
//			'charset' => 'utf8',
		),
                'errorHandler'=>array(
			// use 'site/error' action to display errors
                    'errorAction'=>'site/error',
                ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
                'urlManager'=>array(
                    'urlFormat'=>'path',
                    'showScriptName' => false,
                    'urlSuffix' => '.html',
                    'rules'=>array(
                            //urbac
                            '<_c:(login|logout)>'=>array('/urbac/auth/<_c>', 'caseSensitive'=>false),
                            'rejestracja'=>array('/urbac/auth/register', 'caseSensitive'=>false),
                            'profil'=>array('/urbac/auth/update', 'caseSensitive'=>false),
                            'aktywacja,<u:([^\,]+)>,<v:([^\,]+)>'=>array('/urbac/auth/activation/username/<u>/code/<v>', 'caseSensitive'=>false),

                            '/_<uid:([\S\d]+)>'=>'/site/index/uid/<uid>',
                            
                    ),

                ),
                'clientScript'=>array(
                    'scriptMap'=>array(
                        'jquery.js'=>'/js/jquery-1.3.2.min.js',
//                        'jquery.js'=>'/js/jquery-1.4.1.min.js',
                        'jquery-ui.js'=>'/js/jquery-ui-1.7.2.custom.min.js',
                        'jquery.form.js'=>'/js/jquery.form.js',
                        'jquery.swfobject.js'=>'/js/jquery.flash.min.js',
                        'jquery.sifr.js'=>'/js/jquery.sifr.min.js',
                        'jquery-layout.js'=>'/js/jquery.layout-latest.js',
                        'main.js'=>'/js/main.js',
                        'jquery-ui.css'=>'/css/custom/jquery-ui-1.7.2.custom.css',
                        'layout.css'=>'/css/layout.css',
                    ),
                ),
	),
        'modules'=>array(
            'urbac'=>array(
                'usersTable'=>'Users',   //optional defaults to 'Users'
                'hashWord'=>'vlt',       //optional defaults to 'hash'
            ),
        ),


	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);